package com.dk.controller;


import com.dk.data.Result;
import com.dk.em.ResultEnum;
import com.dk.entity.DtGoods;
import com.dk.entity.DtGoodsDec;
import com.dk.service.IDtRecycleNearbyService;
import com.dk.vo.SpecVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;
import springfox.documentation.annotations.ApiIgnore;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 商品表，SKU表 前端控制器
 * </p>
 *
 * @author Lebron
 * @since 2021-12-21
 */
@RestController
@RequestMapping("recycleNearbyController")
@Api(value = "附近商品回收服务")
public class DtRecycleNearbyController {
    @Resource
    private IDtRecycleNearbyService nearbyService;
    @PostMapping("spec")
    @ApiIgnore(value = "规格查询")
    @ApiImplicitParam(name = "id",value = "规格id",required = true,paramType = "query")
    public Result selectSpec(@RequestParam("id")Integer id){
       SpecVO specVO =  nearbyService.selectSpec(id);
       return Result.response(ResultEnum.SUCCESS).setData(specVO);
    }
    @PostMapping("nearby")
    @ApiIgnore(value = "附近回收")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "goods" ,value = "商品表",required = true,paramType = "query"),
            @ApiImplicitParam(name = "goodsDec",value = "商品详细表",required = true,paramType = "query"),
            @ApiImplicitParam(name = "recycle",value = "回收表",required = true,paramType = "query")
    })
    public Result nearbyRecycle(@RequestBody DtGoods goods, @RequestBody DtGoodsDec goodsDec,
                                @RequestParam("recycle")String recycle){
        return null;
    }



}
